<extend name="Base/common"/>
<block name="body">
		<title>消息</title>
	<body style="background:#faf8f8;">
	<style>
		ul li img{width: 80px;height: 80px;}
	</style>
		<!--我的钱包-->
		<div id="newsCenter">
			<header>
				<a href="__MODULE__/Index/index" class="back"><img src="__IMG__/images/back_03.png"/></a>消息中心
				<!-- <input type="button" class="btn_1 btn" style="position: absolute;top: 23px;"  id="btn-font" value="删除"> -->
			</header>
			<div class="newsCList">
				<ul>
				<volist name='data' id='vol'>
				  <if condition="$vol.type eq 1">
					<li class="table-tr click-tr">
                	<input type="hidden" value="{$vol.sid}">
						<img src="__ROOT__{$vol.logo|getimg=###}" width="50" height="50" class="f-fl"/>
						<div class="f-fl ">
							<h1>
								<span class="f-fl">收到自荐</span>
								<!-- <span class="f-fr"><input type="checkbox" class="check check-size" name="id" value="{$vol.id}"></span> -->
							</h1>
							<p style="min-height: 35px;">{$vol.content}</p>
						<input type="hidden" value="{$vol.id}">
						</div>
						<div class="clear"></div>
					</li>
				  </if>

				  <if condition="$vol.type eq 2">
					<li class="table-tr">
					<input type="checkbox" class="check" name="id" value="{$vol.id}">
                	<input type="hidden" value="{$vol.id}">
						<img src="__IMG__/images/newsa_03.jpg" class="f-fl"/>
						<div class="f-fl">
							<h1>
								<span class="f-fl">收到预定</span>
								<!-- <span class="f-fr"><input type="checkbox" class="check check-size" name="id" value="{$vol.id}"></span> -->
							</h1>
							<p>{$vol.content}</p>
						</div>
						<div class="clear"></div>
					</li>
				  </if>

				  <if condition="$vol.type eq 3">
					<li class="table-tr">
                	<input type="hidden" value="{$vol.id}">
						<img src=".{$vol.logo|getimg=###}" class="f-fl"/>
						<div class="f-fl">
							<h1>
								<span class="f-fl">预订成功</span><span class="f-fr">
								<!-- <input type="checkbox" class="check check-size" name="id" value="{$vol.id}"></span> -->
							</h1>
							<p>{$vol.content}</p>
						</div>
						<div class="clear"></div>
					</li>
				  </if>

				  <if condition="$vol.type eq 4">
					<li class="table-tr">
						<img src="__IMG__/images/newsa_03.jpg" class="f-fl"/>
						<div class="f-fl">
								<!-- <span class="f-fr">
								<input type="checkbox" class="check check-size" name="id" value="{$vol.id}"></span> -->
							<h1><span class="f-fl">系统通知</span></h1>
							<p>{$vol.content}</p>
						</div>
						<div class="clear"></div>
					</li>
				  </if>
				</volist>
        		{$page}
				</ul>
			</div>
		</div>
	</body>
<script type="text/javascript">
$('.click-tr').on('click',function(){
        var uid = $(this).find('input:hidden').val();
        var num = 2;
		//lkl判断是否是自荐
       window.location.href='__MODULE__/UserMember/userDetail/uid/'+uid+'/teaching/'+num+'/is_zj/'+1;
    });
    $('.btn').on('click',function(){
    	var obj = $('.check');
        var msg = confirm('你确定要删除吗？');
                if(msg){
                 check_val = [];
                    for(k in obj){
                        if(obj[k].checked)
                            check_val.push(obj[k].value);
            }
            $.ajax({
                url: "{:U('ajaxDel')}",
                type: 'POST',
                dataType: 'json',
                data: {ids: check_val},
                success:function(del){
                layer.msg('删除成功', {
                  time: 20000, //20s后自动关闭
                        });
                }
            })
                location.reload();
         }
    });
</script>
</block>
